package com.example.factory.responsibility.slot;

import com.example.factory.responsibility.Context;
import com.example.factory.responsibility.ResourceWrapper;
import com.example.factory.responsibility.node.DefaultFirstProcessNode;
import org.springframework.stereotype.Component;

@Component
public class TransitionSlot extends AbstractLinkedProcessorSlot<DefaultFirstProcessNode> {

    @Override
    public void entry(Context context, ResourceWrapper wrapper, DefaultFirstProcessNode param) {
        System.out.println(" start of Transition slot");
        param.checkNode();
        param.handler();
    }

    @Override
    public void exit(Context context, ResourceWrapper wrapper, Object param) {
        System.out.println(" end of Transition slot");
    }
}
